<div class="page-products">
    <div class="bhz-category-wrap">
        <div ng-include="'catalog/view/theme/bhz/pc/modules/includes/category.html'" ng-controller="CategoryCtrl"></div>
    </div>
    <div class="border-top"></div>
    <div class="products-wrap w">
        <div class="category-filter-wrap">
            <ul class="accordion">
                <li class="filter-item clearfix" ng-repeat="filterGroup in filterGroups">
                    <div class="filterGroup-name">
                        {{filterGroup.name}}
                    </div>
                    <ul class="options clearfix">
                        <li class="option-item" ng-repeat="filterOption in filterGroup.filter">
                            <a class="option-item-link clearfix" href="javascript:void(0);" ng-click="selectOption(filterGroup,filterOption);filter();" ng-class="{'select':filterGroup.currOption.filter_id == filterOption.filter_id}">
                                <span class="item-text">{{filterOption.name}}</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
		<div class="help-div">
			<p>推荐搜索：<a ng-repeat="(key,help) in helps" ng-if="key<6" href="index.php?route=common/pc#/products?search={{help}}" >{{help}}</a><span class="help-no" ng-if="helps.length<1">系统暂时无相关搜索</span></p>
		</div>
        <div class="sorts-wrap clearfix">
            <div class="sort" ng-class="{'curr':searchParams.sort == 'sort_order'}" ng-click="sort('sort_order')">综合<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'sort_order' && searchParams.order == 'asc','desc':searchParams.sort == 'sort_order' && searchParams.order == 'desc'}"></i></div>
            <div class="sort" ng-class="{'curr':searchParams.sort == 'quantity'}" ng-click="sort('quantity')">销量<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'quantity' && searchParams.order == 'desc','desc':searchParams.sort == 'quantity' && searchParams.order == 'asc'}"></i></div>
            <div class="sort" ng-click="sort('price')" ng-class="{'curr':searchParams.sort == 'price'}">价格<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'price' && searchParams.order == 'asc','desc':searchParams.sort == 'price' && searchParams.order == 'desc'}"></i></div>
        </div>
        <ul class="products-list clearfix">
            <li class="product-item-wrap" ng-repeat="product in products" ng-if="products && products.length>0">
                <div class="product-item">
                    <div class="product-image-wrap image-div" ng-click="jump('/product/'+product.id, false, true)">
                        <img ng-src="{{product.image}}">
						<div class="p-icon lp">
							<img ng-if="product.show_new==1" ng-src="image/tag/new.png">
						</div>
						<div class="p-icon rp">
							<img ng-if="product.recommend==1" ng-src="image/tag/recommend.png">
							<img ng-if="product.clearance==1 && product.show_clearance==1" ng-src="image/tag/clearance.png">
							<img ng-if="product.promotion==1" ng-src="image/tag/promotion.png">
						</div>
                        <div class="top-left-icon" ng-show="product.upc==1">
                            <img ng-src="catalog/view/theme/bhz/pc/images/628logo.png">
                        </div>
                        <div class="top-left-icon" ng-show="product.upc==2">
                            <img ng-src="catalog/view/theme/bhz/pc/images/miaoshaicon.png">
                        </div>
                        <div class="bottom-left-icon" ng-show="product.upc==1">
                            <div class="count-number">{{product.jan}}</div>
                        </div>
                    </div>
                    <div class="product-info-wrap">
						<div style="height:60px;">
							<div class="name auto-cut-word-two-line">
								<span ng-if="product.lack_status == 2">D-</span><span ng-if="product.lack_status == 3">I-</span>{{product.name}}
								<span ng-if="product.show_cart==2" style="color:red;">(正在备货中)</span>	
							</div>
							<div class="stock-tips" ng-if="product.lack_status == 2 || product.lack_status == 3">{{product.lack_reason}}</div>
						</div>
                        <div class="price-wrap">
                            <span class="price">{{product.special_formated}}</span>
                            <span class="price-old">{{product.price_formated}}</span>
                        </div>
                        <div class="minimum-wrap">
                            <span>起批量： </span>
                            <span>{{product.minimum}}</span>
							<span style="float:right;" ng-if="product.clearance==1|| product.lack_status == 3"> 
								<span>库存： </span>
								<span>{{product.clearqty}}</span>
							</span>
                        </div>
                        <div class="add-to-cart cart-btn clearfix">
                            <!-- <div class="quantity-input-wrap clearfix">
								<input type="text" ng-model="product.selectQuantity" onkeyup="value=this.value.replace(/\D+/g,'')" />
								<span class="reduce update-quantity" ng-click="updateQuantity('reduce',product)">&Lambda;</span>
								<span class="add update-quantity" ng-click="updateQuantity('add',product)">&Lambda;</span>
							</div> -->
                            <a ng-if="product.show_cart==1" href="javascript:void(0);" class="btn-add" ng-click="addToCart(product);">加入购物车</a>
                        </div>
                    </div>
                </div>
            </li>
            <div class="no-products" ng-if="products === false || products.length<1">没有查询到任何商品...</div>
            <div class="loading" ng-show="!withoutMore" id="LoadingPlace">正在加载...</div>
        </ul>
    </div>
</div>
